            <div class="form-group">
                <label class="col-sm-2 control-label">随机立减活动时间</label>
                <div class="col-sm-4 col-xs-6">
                    {php echo tpl_form_field_daterange('randtime', array('starttime'=>date('Y-m-d H:i', !empty($item['randtime']['start'])?$item['randtime']['start']:time()),'endtime'=>date('Y-m-d H:i', !empty($item['randtime']['end'])?$item['randtime']['end']:time())),true);}
                </div>
            </div>

            <div class="form-group">
                <label class="col-sm-2 control-label">随机立减时间段</label>
                <div class="col-sm-8 col-xs-12" id="addrandtime">
                    {loop $item['randtime']['start1'] $key $value}
                    <div class="input-group" style="margin-top: 10px;margin-bottom: 10px">
                        <input type="number" name="data[randtime][start1][]" class="form-control" value="{$item['randtime']['start1'][$key]}">
                        <span class="input-group-addon">:</span>
                        <input type="number" name="data[randtime][start2][]" class="form-control valid" value="{$item['randtime']['start2'][$key]}">
                        <span class="input-group-addon">至</span>
                        <input type="number" name="data[randtime][end1][]" class="form-control" value="{$item['randtime']['end1'][$key]}">
                        <span class="input-group-addon">:</span>
                        <input type="number" name="data[randtime][end2][]" class="form-control" value="{$item['randtime']['end2'][$key]}">
                        <span class="input-group-btn"><button type="button" class="btn btn-danger" onclick="$(this).parents('.input-group').remove()">删除</button></span>
                    </div>
                    {/loop}
                    <div></div>
                    <div style="margin-top:5px">
                        <button type='button' class="btn btn-default" onclick='addrandtime(this,"randtime")' style="margin-bottom:5px"><i class='fa fa-plus'></i> 添加区间</button>
                    </div>
                    <div class="help-block">如果随机立减时间段为空 则随机立减时间时间为全天~</div>
                </div>
            </div>

            <div class="form-group">
                <label class="col-sm-2 control-label">最低支付</label>
                <div class="col-sm-8">
                    <div class='input-group'>
                        <span class="input-group-addon">支付金额不低于</span>
                        <input type="number" name="data[rand][minmoney]" value="{$item['rand']['minmoney']}" class="form-control" step="0.01"/>
                        <span class='input-group-addon'> 元</span>
                    </div>
                    <div class="help-block">如果 为空 或者 0 则为不限制支付金额</div>
                </div>
            </div>

            <div class="form-group">
                <label class="col-sm-2 control-label">随机立减</label>
                <div class="col-sm-8 col-xs-12" id="addrand">
                    {php $count = 0;}
                    {loop $tt['rand'] $key $value}
                    <div class="input-group" style="margin-top: 10px;margin-bottom: 10px">
                        <input type="number" name="data[rand][rand_left][]" class="form-control" value="{$tt['rand_left'][$count]}">
                        <span class="input-group-addon">元 &nbsp;&nbsp;&nbsp;至</span>
                        <input type="number" name="data[rand][rand_right][]" class="form-control" value="{$tt['rand_right'][$count]}">
                        <span class="input-group-addon">元 &nbsp;&nbsp;&nbsp;概率</span>
                        <input type="text" name="data[rand][rand][]" class="form-control" value="{$tt['rand'][$count]}">
                        <span class="input-group-addon">%</span>
                        <span class="input-group-btn"><button type="button" class="btn btn-danger" onclick="$(this).parents('.input-group').remove()">删除</button></span>
                    </div>
                    {php $count++;}
                    {/loop}
                    <div id="aad"></div>
                    <div style="margin-top:5px">
                        <button type='button' class="btn btn-default" onclick='addlink()' style="margin-bottom:5px"><i class='fa fa-plus'></i> 添加区间</button>
                    </div>
                </div>
            </div>